

    <!-- 面包屑导航 -->

      <!-- 用户列表 -->
<template>
      <div class="main_welcome">

        <el-breadcrumb separator-class="el-icon-arrow-right">
          <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>文件管理</el-breadcrumb-item>
          <el-breadcrumb-item>文件列表</el-breadcrumb-item>
        </el-breadcrumb>

        <el-card>
          <el-row :gutter="25">
            <el-col :span="10">

              <el-input placeholder="请输入搜索内容" >
                <el-button slot="append" icon="el-icon-search" ></el-button>
              </el-input>
            </el-col>

            <el-col :span="4">
              <el-button type="primary" @click="addDialogVisible = true">查询文件</el-button>
            </el-col>
          </el-row>
        </el-card>

        <table class="table table-bordered table-hover">
          <thead>
          <el-dropdown
              size="small"
              placement="right"
              trigger="click"
              @command="batchOperate"
              style="margin-left: 10px;">
            <el-button type="text" size="medium"><i class="el-icon-download"></i></el-button>
            <el-button type="text" size="medium"><i class="el-icon-delete"></i></el-button>
            <el-button type="text" size="medium"><i class="el-icon-document"></i></el-button>
            <el-button type="text" size="medium"><i class="el-icon-more-outline"></i></el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item >复制到</el-dropdown-item>
              <el-dropdown-item >移动到</el-dropdown-item>
              <el-dropdown-item >重命名</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>

          </thead>
          <tbody id="zuoye">


          </tbody>
        </table>
      </div>
    </template>




    <script>

    import axios from "axios";
    import $ from 'jquery';

    var user=window.sessionStorage.getItem('username');
    console.log(user);
    export default {


      data() {
        return {
          id:''
        }
      },
      methods: {
        getList() {

          $.ajax({
            url: 'http://localhost:9073/file?user='+user,
            dataType: "json",
            success: function (resp) {
              $("#zuoye").empty();

              $.each(resp, function (i, n) {


                $("#zuoye").append("<tr><td><el-button type=\"text\" size=\"medium\"><i class=\"el-icon-folder\"></i></el-button></td><td>" + n.id + "</td></td><td class='m'><a class='a' href='http://localhost:9071/" + n.filename + "'>" + n.filename + "</a></td><td>"+n.min+"</td></td><td class='m'>" + n.ctime + "</td><td><el-button type='text' size='medium'><i class='el-icon-download'></i></el-button></td><td><el-button class='dele' type='text' size='medium'><i class='el-icon-delete'></i></el-button></td><td><el-button type=\"text\" size=\"medium\"><i class=\"el-icon-more-outline\"></i></el-button></td></tr>");

              })
            }

          })

            $(document).on("click",".dele", function () {
              $.ajax({
                url: "http://localhost:9028/delete",
                data: {id:$(this).val()},
                dataType: "json",
                success: function (resp) {
                  location.replace(location.href);

                }
              })

            })



        }



    },



created() {
        this.getList();
      }

      }
    </script>
    <style lang="less" scoped>
    .a{
      text-decoration: none;
    }
    .uploader-example {
      width: 880px;
      padding: 15px;
      margin: 40px auto 0;
      font-size: 12px;
      box-shadow: 0 0 10px rgba(0, 0, 0, .4);
    }
    .uploader-example .uploader-btn {
      margin-right: 4px;
    }
    .uploader-example .uploader-list {
      max-height: 440px;
      overflow: auto;
      overflow-x: hidden;
      overflow-y: auto;
    }
    </style>



      <!-- 分页 -->



